﻿#pragma once
#include <string>
class LunarMonth
{
public:
	/// <summary>
	/// 农历年
	/// </summary>
	int Year;

	/// <summary>
	/// 农历月：1-12，闰月为负数，如闰2月为-2
	/// </summary>
	int Month;

	/// <summary>
	/// 天数，大月30天，小月29天
	/// </summary>
	int DayCount;

	/// <summary>
	/// 初一的儒略日
	/// </summary>
	double FirstJulianDay;

	/// <summary>
	/// 序号
	/// </summary>
	int Index;

	/// <summary>
	/// 地支序号
	/// </summary>
	int ZhiIndex;

	/// <summary>
	/// 初始化
	/// </summary>
	/// <param name="lunarYear">农历年</param>
	/// <param name="lunarMonth">农历月：1-12，闰月为负数，如闰2月为-2</param>
	/// <param name="dayCount">天数</param>
	/// <param name="firstJulianDay">初一的儒略日</param>
	/// <param name="index">序号</param>
	LunarMonth(int lunarYear, int lunarMonth, int dayCount, double firstJulianDay, int index);

	/// <summary>
	/// 通过农历年月初始化
	/// </summary>
	/// <param name="lunarYear">农历年</param>
	/// <param name="lunarMonth">农历月：1-12，闰月为负数，如闰2月为-2</param>
	/// <returns>农历月</returns>
	const static LunarMonth* FromYm(int lunarYear, int lunarMonth);

	/// <summary>
	/// 是否闰月
	/// </summary>
	bool Leap();


	/// <summary>
	/// 天干序号
	/// </summary>
	int GanIndex();

	/// <summary>
	  /// 天干
	  /// </summary>
	std::string Gan();

	/// <summary>
	/// 地支
	/// </summary>
	std::string Zhi();

	/// <summary>
	/// 干支
	/// </summary>
	std::string GanZhi();

	/// <summary>
	/// 喜神方位
	/// </summary>
	std::string PositionXi();

	/// <summary>
	/// 喜神方位描述
	/// </summary>
	std::string PositionXiDesc();

	/// <summary>
	/// 阳贵神方位
	/// </summary>
	std::string PositionYangGui();

	/// <summary>
	/// 阳贵神方位描述
	/// </summary>
	std::string PositionYangGuiDesc();

	/// <summary>
	/// 阴贵神方位
	/// </summary>
	std::string PositionYinGui();

	/// <summary>
	/// 阴贵神方位描述
	/// </summary>
	std::string PositionYinGuiDesc();

	/// <summary>
	/// 福神方位
	/// </summary>
	std::string PositionFu();

	/// <summary>
	/// 福神方位
	/// </summary>
	/// <param name="sect">流派</param>
	/// <returns>福神方位</returns>
	std::string GetPositionFu(int sect = 2);

	/// <summary>
	/// 福神方位描述
	/// </summary>
	std::string PositionFuDesc();

	/// <summary>
	/// 福神方位描述
	/// </summary>
	/// <param name="sect">流派</param>
	/// <returns>方位描述</returns>
	std::string GetPositionFuDesc(int sect = 2);
	/// <summary>
	/// 财神方位
	/// </summary>
	std::string PositionCai();

	/// <summary>
	/// 财神方位描述
	/// </summary>
	std::string PositionCaiDesc();


	/// <summary>
	/// 太岁方位，如艮
	/// </summary>
	std::string PositionTaiSui();



};

